package org.vegsan.calculator;

/**
 * @author Alex
 * @version 1
 */
abstract public class Operation {
		
	private double firstOperand;
	private double secondOperand;
	private String operatorWord;
	protected double result;
	
	
	
	protected Operation(double firstOperand, double secondOperand){
		this.firstOperand = firstOperand;
		this.secondOperand = secondOperand;
	}
	
	public double getFirstOperand(){
		return firstOperand;
		
	}
	
	public double getSecondOperand(){
		return secondOperand;
	}
	
	public double getResult(){
		return result;
	}
	
	protected void setOperatorWord(String operatorWord){
		this.operatorWord = operatorWord; 
	}
	
	public String toString(){
		return ((Double)firstOperand).toString() 
				+" "
				+operatorWord
				+" "
				+((Double)secondOperand).toString()
				+" = "
				+result;
	}
	
	
	
	
	
	
	

}
